Skip to content

Add filter to allow disabling an OSGi capability requirement#1073

Open
laeubi wants to merge 4 commits into
eclipse-equinox:masterfrom
laeubi:disbale_req
Open

Add filter to allow disabling an OSGi capability requirement#1073
laeubi wants to merge 4 commits into
eclipse-equinox:masterfrom
laeubi:disbale_req

Conversation

@laeubi
Copy link
Copy Markdown
Member

@laeubi laeubi commented May 18, 2026

This allows to use generic require capability in builds that otherwise would create a cyclic dependency issue.

This is similar to what SWT does here:

https://github.com/eclipse-platform/eclipse.platform.swt/blob/7f9089ed7daaf630970fea7fa5bdb18cfba5cdcb/bundles/org.eclipse.swt/META-INF/p2.inf

  1. It create a requirement to its fragment
  2. The fragment has a requirement to the host
  3. To break the cycle there is a !(org.eclipse.swt.buildtime=true) filter property that we then set here https://github.com/eclipse-platform/eclipse.platform.swt/blob/7f9089ed7daaf630970fea7fa5bdb18cfba5cdcb/bundles/org.eclipse.swt/pom.xml#L39-L41 to disable this only for building the host.

This change has to actually happen at Tycho (where we should have a integration test), but for consistency and to gather some agreement first I opened it here.

@laeubi laeubi requested a review from merks May 18, 2026 05:21
Copy link
Copy Markdown
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea. Some tiny little suggestions.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

Test Results

12 files   -     6  12 suites   - 6   0s ⏱️ - 28m 42s
26 tests  - 2 143  26 ✅  - 2 140  0 💤  - 3  0 ❌ ±0 
78 runs   - 5 083  78 ✅  - 5 074  0 💤  - 9  0 ❌ ±0 

Results for commit 0cfd7b9. ± Comparison against base commit e3b8d67.

This pull request removes 2143 tests.
org.eclipse.equinox.frameworkadmin.tests.Bug196525 ‑ testConfigContent
org.eclipse.equinox.frameworkadmin.tests.Bug258370 ‑ testComma
org.eclipse.equinox.frameworkadmin.tests.CleanupTest ‑ testOSGiRemoval
org.eclipse.equinox.frameworkadmin.tests.CleanupTest ‑ testSimpleConfiguratorRemoval
org.eclipse.equinox.frameworkadmin.tests.CleanupTest ‑ testWithMutipleBundles
org.eclipse.equinox.frameworkadmin.tests.FrameworkExtensionTest ‑ testAddRemoveFrameworkExtension
org.eclipse.equinox.frameworkadmin.tests.LauncherConfigLocationTest ‑ testCustomLauncherConfig
org.eclipse.equinox.frameworkadmin.tests.LauncherDataTest ‑ testRemoveProgramArg
org.eclipse.equinox.frameworkadmin.tests.ManipulatorTests ‑ testBug212361_osgiInBundlesList
org.eclipse.equinox.frameworkadmin.tests.ManipulatorTests ‑ testBug258126_ProgramArgs_VMArgs
…

♻️ This comment has been updated with latest results.

laeubi and others added 3 commits June 1, 2026 10:07
…2/tests/publisher/actions/BundlesActionRequireCapabilityFilterTest.java

Co-authored-by: Ed Merks <Ed.Merks@gmail.com>
…se/equinox/p2/publisher/eclipse/BundlesAction.java

Co-authored-by: Ed Merks <Ed.Merks@gmail.com>
…2/tests/publisher/actions/BundlesActionRequireCapabilityFilterTest.java

Co-authored-by: Ed Merks <Ed.Merks@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants